package com.lanxiao.cloud.modules.oauth.application.dto;

import com.lanxiao.cloud.modules.oauth.infrastructure.enums.LoginType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;

/**
 * @author ：qiaoliang
 * @date ：2021-09-14
 */
@ApiModel("注册模型")
public class RegisterCmd {

  @ApiModelProperty(value = "类型")
  @NotNull(message = "注册类型不能为空.")
  private LoginType type;
  @ApiModelProperty(value = "标识（手机号 邮箱 用户名或第三方应用的唯一标识）")
  @NotNull(message = "注册标识不能为空.")
  private String principal;
  @ApiModelProperty(value = "密码凭证（站内的保存密码，站外的不保存或保存token）")
  @NotNull(message = "注册密码凭证不能为空.")
  private String credential;
  @ApiModelProperty(value = "昵称")
  @NotNull(message = "注册昵称不能为空.")
  private String name;

  public RegisterCmd() {
  }

  public RegisterCmd(LoginType type, String principal, String credential, String name) {
    this.type = type;
    this.principal = principal;
    this.credential = credential;
    this.name = name;
  }

  public LoginType getType() {
    return type;
  }

  public String getPrincipal() {
    return principal;
  }

  public String getCredential() {
    return credential;
  }

  public String getName() {
    return name;
  }
}
